package fr.uniscol.siecle.model;

import java.io.Serializable;

public class Discipline implements Serializable, DonneeSiecle {

	private String code = null;
	
	private String libelleCourt = null;
	
	private float nbrHeures = 0.0f;

	public Discipline() {
		super();
	}

	public Discipline(String code, String libelleCourt) {
		super();
		this.code = code;
		this.libelleCourt = libelleCourt;
	}

	public String getCode() {
		if(code == null){
			code = "";
		}
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getLibelleCourt() {
		if(libelleCourt == null){
			libelleCourt = "";
		}
		return libelleCourt;
	}

	public void setLibelleCourt(String libelleCourt) {
		this.libelleCourt = libelleCourt;
	}

	public float getNbrHeures() {
		return nbrHeures;
	}

	public void setNbrHeures(float nbrHeures) {
		this.nbrHeures = nbrHeures;
	}

	@Override
	public boolean equals(Object obj) {
		Discipline d = (Discipline)obj;
		return getCode().equals(d.getCode());
	}
}
